package ProjetCorba;

/**
 * Interface definition : Operateur
 * 
 * @author OpenORB Compiler
 */
public class _OperateurStub extends org.omg.CORBA.portable.ObjectImpl
        implements Operateur
{
    static final String[] _ids_list =
    {
        "IDL:ProjetCorba/Operateur:1.0"
    };

    public String[] _ids()
    {
     return _ids_list;
    }

    private final static Class _opsClass = ProjetCorba.OperateurOperations.class;

    /**
     * Read accessor for LsTra attribute
     * @return the attribute value
     */
    public ProjetCorba.tTransporteur[] LsTra()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_LsTra",true);
                    _input = this._invoke(_output);
                    return ProjetCorba.LesTransporteursHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_LsTra",_opsClass);
                if (_so == null)
                   continue;
                ProjetCorba.OperateurOperations _self = (ProjetCorba.OperateurOperations) _so.servant;
                try
                {
                    return _self.LsTra();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Write accessor for LsTra attribute
     * @param value the attribute value
     */
    public void LsTra(ProjetCorba.tTransporteur[] value)
    {
        while(true)
        {
            if (!this._is_local())
            {
                    org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_set_LsTra",true);
                    ProjetCorba.LesTransporteursHelper.write(_output,value);
                    _input = this._invoke(_output);
                    return;
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_set_LsTra",_opsClass);
                if (_so == null)
                   continue;
                ProjetCorba.OperateurOperations _self = (ProjetCorba.OperateurOperations) _so.servant;
                try
                {
                    _self.LsTra(value);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation notifierTra
     */
    public void notifierTra(short code)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("notifierTra",false);
                    _output.write_short(code);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("notifierTra",_opsClass);
                if (_so == null)
                   continue;
                ProjetCorba.OperateurOperations _self = (ProjetCorba.OperateurOperations) _so.servant;
                try
                {
                    _self.notifierTra( code);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

}
